package com.lesso.cyg.sunflower.app.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.lesso.cyg.sunflower.domain.service.AttendanceRuleDomainService;
import com.lesso.cyg.sunflower.pojo.dto.AttendanceRuleDTO;
import com.lesso.cyg.sunflower.pojo.dto.AttendanceRuleQueryDTO;
import com.lesso.cyg.sunflower.service.IAttendanceRuleService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

/**
 * AttendanceRuleServiceImpl
 *
 * @author cyg
 * @since 2025-07-02
 */
@Service
@DubboService
public class AttendanceRuleServiceImpl implements IAttendanceRuleService {
    private final AttendanceRuleDomainService attendanceRuleDomainService;

    public AttendanceRuleServiceImpl(AttendanceRuleDomainService attendanceRuleDomainService) {
        this.attendanceRuleDomainService = attendanceRuleDomainService;
    }

    @Override
    public Integer save(AttendanceRuleDTO dto) {
        return attendanceRuleDomainService.save(dto);
    }

    @Override
    public void deleteById(Long id) {
        attendanceRuleDomainService.deleteById(id);
    }

    @Override
    public Integer update(AttendanceRuleDTO dto) {
        return attendanceRuleDomainService.update(dto);
    }

    @Override
    public Page<AttendanceRuleDTO> page(AttendanceRuleQueryDTO dto) {
        return attendanceRuleDomainService.page(dto);
    }
}